package front;

import java.util.ArrayList;
import java.util.List;
import prim.Primitive;

public class Scene
{
    
    private List<Primitive> prims;
    
    public List<Primitive> getPrimitives()
    {
        return this.prims;
    }
    
    public Scene(String fileName)
    {
        this.prims = new ArrayList<>();
        
        this.loadScene(fileName);
    }
    
    private void loadScene(String fileName)
    {
        SceneReader sr = new SceneReader(fileName);
        Primitive prim;
        while ((prim = sr.getNextPrimitive()) != null)
        {
            this.prims.add(prim);
        }
    }
    
}
